package cn.mw.cmdb.virtualization.enums;

/**
 * @author gengjb
 * @description 虚拟化数据类型查询
 * @date 2024/7/2 11:20
 */
public enum VirtualizationDataTypeEnum {
        HOST_LIST("HOST_LIST","主机列表数据"),
        VM_LIST("VM_LIST","虚拟机列表数据"),
        HISTORY("History","历史数据"),
        TREND("Trend","趋势数据"),
    ;


    private String dataType;

    private String desc;

    VirtualizationDataTypeEnum(String dataType, String desc) {
        this.dataType = dataType;
        this.desc = desc;
    }

    public String getDataType() {
        return dataType;
    }

    public String getDesc() {
        return desc;
    }


    public static VirtualizationDataTypeEnum getDataTypeEnum(String dataType) {
        for (VirtualizationDataTypeEnum dataTypeEnum : values()) {
            if (dataType.equals(dataTypeEnum.getDataType())) {
                return dataTypeEnum;
            }
        }
        return null;
    }
}
